﻿@model IEnumerable<WuKeSong.Areas.Music.Models.Music>

@{
    ViewBag.Title = "SearchIndex";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>SearchIndex</h2>

<p>
    @Html.ActionLink("Create New", "Create")

    @using (Html.BeginForm("Search","Music",FormMethod.Get)) 
    {
    <p>Keyword: @Html.TextBox("id")
        <input type="submit" value="Filter" /></p>
    }
</p>
<table>
    <tr>
        <th>
            Title
        </th>
        <th>
            Author
        </th>
        <th>
            Genre
        </th>
        <th>
            Comment
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Author)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Genre)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Comment)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
    </tr>
}

</table>
